package com.zjj.spring.javaconfig.config.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ConfigAwareBean implements BeanNameAware, BeanFactoryAware, ApplicationContextAware {
	
	public void setBeanName(String name) {
		System.out.println("【4】BeanFactory setBeanName");
	}
	// BeanFactoryAware setter（在bean实例化期间由Spring调用）
    public  void setBeanFactory(BeanFactory beanFactory) throws BeansException {
 		System.out.println("【5】BeanFactory setBeanFactory");
    }

	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
 		System.out.println("【6】BeanFactory setApplicationContext");
	}

}
